﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics.Contracts;
using System.Linq;
using System.Reflection;
using System.Text;
using Ruleweaver.Rules.CheckMethods;

namespace Ruleweaver.Annotation
{
	[CLSCompliant(false)]
	public sealed class CheckIsInAttribute : CheckAttribute
	{
		public CheckIsInAttribute(params object[] values)
		{
			Contract.Requires(values != null);

			Values = values.ToList().AsReadOnly();
		}

		public ReadOnlyCollection<object> Values { get; private set; }

		protected override ICheckMethod GetCheckMethod()
		{
			return new IsInMethod(Values);
		}
	}
}